from bs4 import BeautifulSoup

#解析器有 'html.parser' ,'lxml', 'xml' , 'html5lib'
soup = BeautifulSoup('<p>hello</p>','lxml')
print(soup.p.string)